package com.kc.gb.device.common.properties;

import com.kc.gb.device.common.dto.CameraConfig;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.representer.Representer;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;

/**
 * ！！！ import
 * 配置文件中不要使用host.ip 类似的 dot 分割的属性, 以免影响到 yaml 文件的序列化和反序列化
 */
@Slf4j
@Data
public class DeviceProperties {
    private boolean forceSpecifiedStation;
    private String forceSpecifiedStationCode;
    private String hostIP;
    private long warehouseId = 1l;
    private String language;

    //PTL 设备配置
    private boolean devicePtlEnabled;
    private String devicePtlImpl;
    private int devicePtlQuantity;
    private String devicePtlIP;
    private int devicePtlPort;
    private int devicePtlControlID;

    //Slant 设备配置
    private boolean deviceSlantEnabled;
    private String deviceSlantIP;
    private int deviceSlantPort;

    //Strip 设备配置
    private boolean deviceStripEnabled;
    private String deviceStripIP;
    private int deviceStripPort;

    // 相机配置
    private boolean deviceCameraEnabled;
    private String deviceCameraModel;
    private String deviceCameraDirection;
    private boolean deviceCameraScanBeforeEnter;
    private List<CameraConfig> deviceCameraConnections;

}
